#include "cktsat/cktcover.h"
#include "util/util.h"
#include "usage.h"

#include <iostream>
using std::cout;
using std::endl;

extern int REFINE_CNT;
extern bool OPTIMIZE;
int main(unsigned argc,const char ** argv)
{
   ArgAnalyzer arg("do <infile> [-cnf <file:cnf>] [-nocover] [-refine <int:refine>] [-nopt]",argc,argv);

   CktCover ckt;
   ckt.read_aig( arg[0].c_str() );
   ckt.init( true );
   if( arg["-refine"].setted ) REFINE_CNT = atoi( arg["-refine"][0] );
   if( arg["-nocover"].setted == false )
      ckt.covering();
   
   ckt.assignLit();
   ckt.write_cnf( arg["-cnf"][0]);
}
